<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		年：<input type="text" id="input1" />
		月：<input type="text" id="input2" />
		日：<input type="text" id="input3" />
		<button onclick="calcDay()">计算</button>
		<script>
			
			function calcDay()
			{var d1 = new Date();
			var d2 = new Date(parseInt(input1.value), parseInt(input2.value), parseInt(input3.value));
			
			var span = d1.getTime() - d2.getTime();
			document.write((span/1000/60/60/24) + "天")}
		</script>
	</body>
</html>
